package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WfJobMaster generated by hbm2java
 */
@Entity
@Table(name="wf_job_master"
    ,catalog="ncsc_erp"
)
public class WfJobMaster  implements java.io.Serializable {


     private long jmNo;
     private HrEmp hrEmp;
     private WfWorkstation wfWorkstation;
     private String jmCode;
     private String jmDescr;
     private Date jmCreatedDtm;
     private Short jmIsActive;
     private Date jmEffectiveDate;
     private Date jmExpireDate;
     private Set<WfFlowTransLine> wfFlowTransLines = new HashSet<WfFlowTransLine>(0);
     private Set<WfFlowMasterLine> wfFlowMasterLines = new HashSet<WfFlowMasterLine>(0);

    public WfJobMaster() {
    }

	
    public WfJobMaster(long jmNo) {
        this.jmNo = jmNo;
    }
    public WfJobMaster(long jmNo, HrEmp hrEmp, WfWorkstation wfWorkstation, String jmCode, String jmDescr, Date jmCreatedDtm, Short jmIsActive, Date jmEffectiveDate, Date jmExpireDate, Set<WfFlowTransLine> wfFlowTransLines, Set<WfFlowMasterLine> wfFlowMasterLines) {
       this.jmNo = jmNo;
       this.hrEmp = hrEmp;
       this.wfWorkstation = wfWorkstation;
       this.jmCode = jmCode;
       this.jmDescr = jmDescr;
       this.jmCreatedDtm = jmCreatedDtm;
       this.jmIsActive = jmIsActive;
       this.jmEffectiveDate = jmEffectiveDate;
       this.jmExpireDate = jmExpireDate;
       this.wfFlowTransLines = wfFlowTransLines;
       this.wfFlowMasterLines = wfFlowMasterLines;
    }
   
     @Id 

    
    @Column(name="JM_NO", unique=true, nullable=false)
    public long getJmNo() {
        return this.jmNo;
    }
    
    public void setJmNo(long jmNo) {
        this.jmNo = jmNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JM_CREATED_BY_EMP_NO")
    public HrEmp getHrEmp() {
        return this.hrEmp;
    }
    
    public void setHrEmp(HrEmp hrEmp) {
        this.hrEmp = hrEmp;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JM_WS_NO")
    public WfWorkstation getWfWorkstation() {
        return this.wfWorkstation;
    }
    
    public void setWfWorkstation(WfWorkstation wfWorkstation) {
        this.wfWorkstation = wfWorkstation;
    }

    
    @Column(name="JM_CODE", length=50)
    public String getJmCode() {
        return this.jmCode;
    }
    
    public void setJmCode(String jmCode) {
        this.jmCode = jmCode;
    }

    
    @Column(name="JM_DESCR", length=300)
    public String getJmDescr() {
        return this.jmDescr;
    }
    
    public void setJmDescr(String jmDescr) {
        this.jmDescr = jmDescr;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="JM_CREATED_DTM", length=19)
    public Date getJmCreatedDtm() {
        return this.jmCreatedDtm;
    }
    
    public void setJmCreatedDtm(Date jmCreatedDtm) {
        this.jmCreatedDtm = jmCreatedDtm;
    }

    
    @Column(name="JM_IS_ACTIVE")
    public Short getJmIsActive() {
        return this.jmIsActive;
    }
    
    public void setJmIsActive(Short jmIsActive) {
        this.jmIsActive = jmIsActive;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="JM_EFFECTIVE_DATE", length=10)
    public Date getJmEffectiveDate() {
        return this.jmEffectiveDate;
    }
    
    public void setJmEffectiveDate(Date jmEffectiveDate) {
        this.jmEffectiveDate = jmEffectiveDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="JM_EXPIRE_DATE", length=10)
    public Date getJmExpireDate() {
        return this.jmExpireDate;
    }
    
    public void setJmExpireDate(Date jmExpireDate) {
        this.jmExpireDate = jmExpireDate;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="wfJobMaster")
    public Set<WfFlowTransLine> getWfFlowTransLines() {
        return this.wfFlowTransLines;
    }
    
    public void setWfFlowTransLines(Set<WfFlowTransLine> wfFlowTransLines) {
        this.wfFlowTransLines = wfFlowTransLines;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="wfJobMaster")
    public Set<WfFlowMasterLine> getWfFlowMasterLines() {
        return this.wfFlowMasterLines;
    }
    
    public void setWfFlowMasterLines(Set<WfFlowMasterLine> wfFlowMasterLines) {
        this.wfFlowMasterLines = wfFlowMasterLines;
    }




}


